/**
 * 
 */
package ua.at.tsvetkov.locale;

import java.lang.reflect.Field;

import ua.at.tsvetkov.util.Log;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.view.View;

/**
 * Not ready yet.
 * @author Alexandr Tsvetkov 19.02.2013
 */
public class Loc {

	private static Field[]	publicFields;

	public static void init(Context context) {
		PackageInfo appData = null;
		try {
			appData = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES);
			String className = appData.packageName + "R.drawable";
			Class<?> clazz = Class.forName(className);
			publicFields = clazz.getFields();
			for (Field field : publicFields) {
			    System.out.println("Имя: " + field.getName());
			}
		} catch (NameNotFoundException e) {
			Log.e("Package not found", e);
			return;
		} catch (ClassNotFoundException e) {
			Log.e("Class not found", e);
			return;
		}
	}

	public static View findLocaleImageById(int id) {
		return null;
	}

}
